void adaptative_subdiv(float maxerror,float *points,int maxpoints)
Parameter | Type | Description |
---|---|---|
maxerror | float | the curve maximum error |
points | float * | pointer to an array of floats to receive the subdivided points |
maxpoints | int | the total number of floats in the points array |
None
This function recursively subdivides the Bezier curve adaptatively. It subdivides segments that the midpoint distance to the actual curve is greater than the maxerror value.
At the end of the subdivision, the points array will have the curve points (each point a float from 0.0 to 1.0) where to intepolate the curve to get the actual adaptively subdivided curve.